package com.itcanteen.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itcanteen.reggie.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2022/10/26 16:10
 */

@Mapper
public interface DishFlavorDao extends BaseMapper<DishFlavor> {

    //批量插入
    void batchSave(@Param("flavorList") List<DishFlavor> flavorList);
    /**
     * 根据菜品的id查找口味信息
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id=#{id}")
    List<DishFlavor> findByDishId(Long id);
}
